/*******************************************************************************
 * Copyright (c) 2007 Exadel, In
c. and Red Hat, Inc.
 * Distributed under license by Red Hat, Inc. All rights reserved.
 * This program is made available under the terms of the
 * Eclipse Public License v1.0 which accompanies this distribution,
 * and is available at http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Exadel, Inc. and Red Hat, Inc. - initial API and implementation
 ******************************************************************************/ 
package demo;

import javax.ejb.EJB;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import org.jboss.seam.ScopeType;
import org.jboss.seam.annotations.Name;
import org.jboss.seam.annotations.Scope;

import test.TestRemote;

/**
 * Created by JBoss Tools
 */
@Name("test")
@Scope(ScopeType.CONVERSATION)
public class Person {
	private String name;
	
	private TestRemote test;
	
	
	public Person() {
		try {
			test=(TestRemote)new InitialContext().lookup("ejb/Test");
		} catch (NamingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public String getName() {
		return test.holaMundo();
	}

	public void setName(String name) {
		this.name = name;
	}
}